#ifndef __MY_STRING_H__
#define __MY_STRING_H__

#include <iostream>
using namespace std;

class my_string{
    private:
        char *p_str;
        int length;
    public:
        my_string(void);
        my_string(const char *p);
        my_string(int count, char value);
        my_string(const my_string &other);
        my_string &operator=(const my_string &other);
        my_string &operator=(const char *p);
        ~my_string(void);
        char *c_str(void)const;
        bool empty(void)const;
        int size(void)const;
        char &at(int index);
        my_string operator+(const my_string &R)const;
        my_string &operator+=(const my_string &R);
        bool operator==(const my_string &R);
        friend ostream &operator<<(ostream &x, const my_string &O);
        friend istream &operator>>(istream &x, my_string &O);
};

#endif